﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../../fly-comment.js" type="text/javascript"></script>
    <script src="../../fly.ui.js" type="text/javascript"></script>
    <script src="../../plugins/grid/grid.js" type="text/javascript"></script>
    <link href="../../Plugins/themes/grid.css" rel="stylesheet" type="text/css" />
    <script>
        $(function () {

            var store = new $.data.Store(
            {
                proxy: new $.data.HttpProxy({
                    url: "data.json"
                }),
                reader: new $.data.JsonReader(
            	{
            	    root: 'rows',
            	    totalProperty: 'records',
            	    id: 'id'
            	}, [
                {   
                    name:0,
                    mapping:"cell[0]",
                    type:"int"
                },
                {   
                    name:1,
                    mapping:"cell[1]",
                    type:"datetime"
                },
                {
                    name: 2,
                    mapping: "cell[2]"
                },
                {
                    name: 3,
                    mapping: "cell[3]",
                    type:"float"
                },
                {
                    name: 4,
                    mapping: "cell[4]",
                    type:"float"
                },
                {
                    name: 5,
                    mapping: "cell[5]",
                    type:"float"
                },
                {
                    name: 6,
                    mapping: "cell[6]"
                }]),
                remoteSort: true,
                baseParams:
            	{
            	    classname: 'ClassInfoAjax',
            	    methodname: 'GetList',
            	    start: 0,
            	    limit: 5
            	}
            });

            var rs = store.load()

            var panel = new $.ui.grid.GridPanel({
                id: 'panel',
                store: store,
                height: 400,
//                plugins: new $.ui.grid.TreeGridPlugin({
//                    parentCascade:true,
//                    childCascade:true
//                }),
                columns: [
                new $.ui.grid.CheckboxSelectionModel(),
                {
                    dataIndex: "id",
                    width: 40
                },0,1,2,3,4,5,6]
            })

            panel.render(document.body)
        })
    </script>
</head>
<body>
   


</body>
</html>
